<%--
  Created by IntelliJ IDEA.
  User: zhongwei
  Date: 2014/5/15
  Time: 15:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <base href="<%=basePath%>"></base>
    <title>${sessionScope.topicName} - 添加采集</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="css/mainPageStyle.css"/>
    <link rel="stylesheet" href="css/pagination.css"/>
    <link rel="stylesheet" href="css/subPage.css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.pagination.js"></script>
    <%@include file="../im.jsp" %>
</head>


<body>
<logic:notEmpty name="user">
    <div id="content" class="container">
        <%@include file="../top.jsp" %>
        <div class="row">
            <%@include file="../left.jsp" %>


            <div class="right col-md-10">
                <div id="right_left">
                    <html:form action="spiderAction.do?method=insert" method="post">
                        <html:hidden property="id"></html:hidden>
                        <table>
                            <tr>
                                <td>
                                    <span style="font-weight:bolder;">添加新采集</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    当前主题：
                                </td>
                                <td>
                                        ${topicName}
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    选择采集站点：
                                </td>
                                <td>
                                    <html:select property="site">
                                        <logic:present name="siteVo" scope="request">
                                            <html:options collection="siteVo" property="id"
                                                          labelProperty="siteName"></html:options>
                                        </logic:present>
                                    </html:select>
                                </td>

                            </tr>
                            <tr>
                                <td>
                                    爬行策略
                                </td>
                                <td>
                                    <html:select property="crawlertype" value="0">
                                        <html:option value="0">持续采集</html:option>
                                        <html:option value="1">单次采集</html:option>
                                    </html:select>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    参数列表
                                </td>
                                <td>
                                    <html:text property="urlParams"></html:text>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    额外URL
                                </td>
                                <td>
                                    <html:text property="entryUrls"></html:text>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <html:submit property="submit" value="添加"></html:submit>
                                </td>
                                <td>
                                    <html:reset property="cancel" value="重置"></html:reset>
                                </td>
                            </tr>
                        </table>
                    </html:form>
                    <a href="spiderAction.do?method=show">返回</a>
                </div>
            </div>
        </div>

    </div>
</logic:notEmpty>
<logic:empty name="user">
    Access Reject! Error 404
</logic:empty>
</body>
</html>
